Near field communication (NFC) is a short range wireless connection technology, and implements, based on a radio frequency identification (RFID) technology, short range communication between electronic devices by means of magnetic induction. To implement intuitive, secure, and non-contact information exchange, content exchange, and transactions, a user only needs to perform a touch operation or get devices closer. With gradual popularity of the NFC technology, many electronic products such as printers, televisions, sound boxes, mobile phones, and cameras are already integrated with an NFC function.
To implement the NFC function, an NFC device mainly includes three functional entities: a device host (DH), an NFC controller (NFCC), and a security element (SE). The DH is responsible for management of the NFCC, for example, initialization, configuration, and power management; the NFCC is responsible for physically transmitting data through a radio frequency interface and by using an antenna; and the SE provides a secure execution environment for an NFC application program. For example, for a smartphone, the DH corresponds to a CPU (such as an application processor or a baseband processor) of the mobile phone, the NFCC corresponds to an NFC chip of the mobile phone, and the SE may be a SIM card or an SD card.
An NFC control interface (NCI) defines a logical interface for communication between the DH and the NFCC. The DH sends a control instruction to the NFCC through the NCI to control the NFCC, and the NFCC may also send a response message or a notification message to the DH through the NCI. In addition, the DH may also send application data to the NFCC through the NCI, and the NFCC forwards the application data to a remote NFC device. Similarly, the NFCC may also send, to the DH through the NCI, data sent by the remote NFC device. Moreover, the NFCC and the SE may communicate with each other through a host controller interface (HCl) by using a communications protocol such as the Single Wire Protocol (SWP). The SE sends an instruction to the NFCC to control the NFCC.
In the NCI, two architectures are defined: a single host architecture and a multi-host architecture. Referring to FIG. 1, the single host architecture is an architecture in which one NFCC is only connected to a DH, and is not connected to an SE; and the multi-host architecture is an architecture in which one NFCC is connected to a DH and one or more SEs.
In the multi-host architecture, an NFCC may be connected to multiple SEs. For example, for a smartphone, multiple SEs may be SIM cards and SD cards, and for a dual card/mode mobile phone, each SIM card and each SD card both can correspond to one SE. Different application programs may run in different SEs. For example, for mobile payment, a payment application of a bank A may run in a SIM card of a first operator, a payment application of a bank B may run in a SIM card of a second operator, and a payment application of China UnionPay may run in an SD card. All these applications in the SE can communicate with a POS machine by using the NFCC to complete a payment transaction.
In the single host architecture, a host of an NFCC is a DH, while in the multi-host architecture, an NFCC is a shared resource, a DH and an SE that is connected to the NFCC are both hosts of the NFCC, and both can initiate a radio frequency communication request to the NFCC.
Currently, all NFC devices use the single host architecture or the multi-host architecture, but the SE does not serve as a host to control the NFCC. Therefore, in the multi-host architecture, although the DH and the SE both can request radio frequency communication from the NFCC, an NCI Specification does not provide any solution to a problem that a conflict occurs when multiple SEs simultaneously request radio frequency communication from the NFCC.